﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Agiltastic
{
    public partial class fMain : Form
    {
        private int _child = 0;
        public fMain()
        {
            InitializeComponent();
            IsMdiContainer = true;
        }

       private void closing(object sender, EventArgs e)
       {
           EnableMenu(true);
       }

       public void EnableMenu(bool b)
       {
           this.menuHeader.Enabled = b;
       }
   
       private void dogsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var f = new fDog();
            EnableMenu(false);
           f.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.closing);
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
        }

        private void clubToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var f = new fClub();
            EnableMenu(false);
            f.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.closing);
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
        }

        private void handlerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var f = new fHandler();
            EnableMenu(false);
            f.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.closing);
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
        }

        private void breedToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var f = new fBreed();
            EnableMenu(false);
            f.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.closing);
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
            
        }

        private void competitionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var f = new fCompetition();
            EnableMenu(false);
            f.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.closing);
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
        }

        

        
       
    }
}
